/*
 * Copyright (c) 2024 iSOFT INFRASTRUCTURE SOFTWARE CO., LTD.
 * easyAda is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */

#include <plat/device.h>
#include <tools/macros.h>
#include <uapi/bootinfo.h>

#define KB *(1024)
#define MB *(1024 KB)


const region_t ksram[] = {
    { .pbase = CONFIG_KERNEL_PBASE, .vbase = CONFIG_KERNEL_VBASE, .size = CONFIG_KERNEL_SIZE },
    { .pbase = CONFIG_KHEAP_PBASE, .vbase = CONFIG_KHEAP_VBASE, .size = CONFIG_KHEAP_SIZE },
    { .size = 0 },
};

const region_t paksram[] = {
    { .pbase = CONFIG_PAGE_TABLE_PBASE, .vbase = CONFIG_PAGE_TABLE_VBASE, .size = CONFIG_PAGE_TABLE_RAM_SIZE },
    { .size = 0 },
};

const region_t ksdev[] = {
    { .pbase = DEVICE_PBASE_UART, .vbase = DEVICE_VBASE_UART, .size = DEVICE_SIZE_UART },
    { .pbase = DEVICE_PBASE_GIC, .vbase = DEVICE_VBASE_GIC, .size = DEVICE_SIZE_GIC },
    { .size = 0 }
};

const region_t usram[] = { 
    { .pbase = CONFIG_RS_PBASE , .vbase = CONFIG_RS_VBASE, .size = CONFIG_RS_SIZE },
    { .pbase = CONFIG_UHEAP_PBASE , .vbase = CONFIG_UHEAP_VBASE, .size = CONFIG_UHEAP_SIZE }, 
    { .size = 0 } };

const region_t usdev[] = {
    { .pbase = DEVICE_PBASE_UART, .vbase = CONFIG_ROOTSERVER_RDEV_ADDR, .size = DEVICE_SIZE_UART },
    { .size = 0 },
};
